<?php
	header("Content-Type:text/html;charset=utf-8");
	require "page.class.php";
	require '../../conn/mysql.php';
	$num=sql("frow", "company", "id", "");
	$page=new Page($num,20);
	$res=sql("s", "company", "*", "{$page->limit}");
	echo '<table cellpadding="2" cellspacing="1" class="table">
		
		<tr>
                <td width="5%" class="list">ID</td>
				<td width="5%" class="list">排序</td>
                <td width="15%" class="list">公司名</td>
                <td width="8%"  class="list" >联系人</td>
				<td width="10%"  class="list" >联系电话</td>
                <td width="8%"  class="list" >客户类型</td>		
				<td width="32%"  class="list" >地址</td>	
	           <td width="12%"  class="list" >状态</td>
	           <td width="5%"  class="list" >操作</td>
       </tr>';
	if($res){
		foreach ($res as $info){
			echo '<tr class="mouse click">
		<td class="list-text">'.gv($info, "id").'</td>
			<td class="list-text">'.gv($info, "order1").'</td>
			<td class="list-text">'.gv($info, "company").'</td>
		<td class="list-text">'.gv($info, "name").'</td>
		<td class="list-text">'.gv($info, "tel").'</td>
		<td class="list-text">'.gv($info, "gust").'</td>
		<td class="list-text">'.gv($info, "adress").'</td>
		<td class="list-text">'.gv($info, "zt").'</td>
		<td class="list-text"><a href="product_add.php?id='.gv($info, "id").'" >编辑</a>｜<a href="../control.php?oper=product_del&id='.gv($info, "id").'" >删除</a></td>
			</tr>';
		}
	}
	
	echo '<tr><td  colspan="9">'.$page->fpage().'</td></tr>';
	echo '</table>';
